Django instrument middleware location is configurable via django settings #2866
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The Django instrumentation middleware is being added at the first place right now and uses request.build_absolute_uri which internally calls get_host which validates if the host is from allowed hosts or not. As a result, users are facing issues in requests where they don't want this validation. In this PR, We allow users to configure where they can place otel middleware.
Fixes # (issue)
#1781
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
At this point in time, it's not yet tested. I want to understand first if this is even the right approach before doing further work on this PR. If it is, I will go ahead and do additional work
Does This PR Require a Core Repo Change?
Checklist (Yet to do):
See contributing.md for styleguide, changelog guidelines, and more.